package com.atwork.wuhua.adapter;

import android.content.Context;
import android.support.annotation.Nullable;
import android.widget.ImageView;

import com.atwork.wuhua.R;
import com.atwork.wuhua.bean.SubDetailBean;
import com.atwork.wuhua.bean.SubDetailNumBean;
import com.atwork.wuhua.utils.GlideUtils.GlideUtil;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.List;

public class SubInAdapter extends BaseQuickAdapter<SubDetailNumBean.DataBean, BaseViewHolder> {
    private Context context;

    public SubInAdapter(Context context, int layoutResId, @Nullable List<SubDetailNumBean.DataBean> data) {
        super(layoutResId, data);
        this.context = context;
    }

    @Override
    protected void convert(BaseViewHolder helper, SubDetailNumBean.DataBean item) {
        GlideUtil.loadCircleImg(context, item.getAvatar(), (ImageView) helper.getView(R.id.img_thumb));

        helper.setText(R.id.tv_name, item.getNickname());
    }
}
